Understanding RAID

Written by Joshua Moore

June 11, 2007 | 05:25

Tags: #hard-drive #raid #redundancy

RAID5 – block level striping with distributed parity information

RAID5 is easily the most popular RAID level used today because it’s a great all-rounder. While there is no one area where RAID5 is the best, it does do everything pretty well and it maintains a decent level of storage efficiency and data security to boot. It requires at least three disks, but performance increases as the number of disks increases, and regardless of how many disks are in the array a single disk’s worth of space remains all that is required for parity.

Any one drive in a RAID5 array can fail without losing any data, however the array will run in state of degraded performance (and with no redundancy) until the failed drive is replaced. The performance of the array with a failed drive depends on the controller, but can vary from slightly degraded to abysmal.

While the array is in this state an additional disk failure would mean that all the data is lost. To protect against this it’s a good idea to either replace the drive as soon as possible or to run a hot-spare. A hot-spare is a drive that does not get used by the array until a disk fails, at which point the controller automatically starts rebuilding the array on the new disk.

Understanding RAID RAID5 and RAID6
To get reasonable performance from a RAID5 array its best to have a dedicated hardware controller. While many on-board controllers do technically support RAID5, there is no dedicated processor for the XOR calculations. This means that the millions of XOR operations performed every time data is written to the array get offloaded onto your CPU. The calculations can bring even the fastest multi-core processor to its knees. Pure hardware RAID5 controllers have to at least have their own processor, disk controllers, memory controller and onboard memory. Higher end models can have such features as a dedicated battery backup module and an on-board Ethernet port.

The core of a RAID controller is its I/O processor, like Intel’s IOP341 processor that is used in many of the latest workstation RAID5 adapters. This processor, unlike a CPU which is designed to be multi-purpose, is designed to solely perform XOR operations. The dedicated I/O processor takes the load off of the CPU and allows for far better performance than software RAID. Controllers also have on-board cache, much like a hard drive has its own on-board cache, but instead of 8 or 16MB, modern controllers have anywhere from 128MB to several GB of on-board memory.

When the system writes data to the array, it’s actually writing it directly to the memory, leaving the controller to calculate parity and decide where to write the data on the disks. In server environments this can be a risk, as in the event of a power loss, any data in the cache is destroyed if the controller doesn’t have its own battery backup. In these situations the controller can be set to write-through, so data gets written directly to disks and misses out the cache entirely. This can drastically degrade write performance so it’s best to either use a battery backup module or just risk it. In home systems, losing the data in the cache really isn’t a big deal so this is best left turned off.

In a desktop environment, RAID5 can bring some performance increases, but (just as any other RAID level) it’s unlikely to be earth shattering unless you’re doing something specialised that specifically benefits from RAID. The high read speeds can provide a similar performance benefits to RAID0, but without the high risk of data loss. Data security is the main benefit RAID5 brings to a desktop environment, the high space efficiency is a definite plus point over RAID1 or RAID0+1/10.

While a RAID5 controller can be expensive, if the array is large enough the cost can be outweighed by the money saved on disks. While the 50 percent space efficiency of RAID1 may be acceptable when only using two drives, costs can quickly mount when the capacity requirements increase, who wants to buy ten drives for RAID0+1 when six drives in RAID5 will give the same amount of space. Sure then you have to fork out for a controller, but you save some cash on the drives, and who doesn’t want a shiny new piece of hardware?

Pros
  • Highly flexible
  • Widespread support
  • Decent storage efficiency (sacrifice one drive’s capacity to parity information)
  • Good all-round performance
  • Controllers are very common, a lot of choice
Cons
  • On-board controllers perform badly
  • Dedicated controllers can be expensive
  • Isn’t the best in any one area


RAID6 – block level striping with double distributed parity information

RAID6 is simply RAID5 with double the amount of parity information and therefore double the data protection. A RAID6 array can survive two disk failures without any data loss, so is great if you’ve either got some very important data, or you’re especially paranoid. This added protection is given at the expense of disk space and performance. RAID6, Like RAID5, isn’t too bad in any area nor does it excel in any particular area. Most modern workstation RAID5 controllers also support RAID6 so the only additional expense over RAID5 is that of an extra drive.

Understanding RAID RAID5 and RAID6
While it is possible to configure as few as four disks as a RAID6 array, it is more suited to higher numbers of drives and particularly high capacity arrays. The higher the capacity of the array, the longer it takes to rebuild it after a disk failure. Rebuilding a RAID5 array of several terabytes can take many hours and if at any point during the rebuild another disk fails, all of the data on the array is lost. RAID6 offers protection against something like this happening.

Pros
  • Can survive two disk failures
  • Offers reasonable performance across the board
Cons
  • Performance slightly lower than RAID5
  • Controllers can be expensive

Discuss this in the forums
YouTube logo
MSI MPG Velox 100R Chassis Review

October 14 2021 | 15:04